<div id="wrapper">
	<!-- Navigation -->
	<nav class="navbar navbar-default navbar-static-top" role="navigation"
		style="margin-bottom: 0" th:fragment="active(tag)">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse"
				data-target=".navbar-collapse">
				<span class="sr-only">Toggle navigation</span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
			<a class="navbar-brand" th:href="${urls.url}">个人博客</a>

		</div>
		<!-- /.navbar-header -->

		<ul class="nav navbar-top-links navbar-right">
			<!-- /.dropdown -->
			<li class="dropdown"><a href="###"
				onclick="$('#logoutForm').submit()">注销</a>
				<form th:action="@{/logout}" method="post" style="display: none;"
					id="logoutForm">
					<input type="hidden" th:name="${_csrf.parameterName}"
						th:value="${_csrf.token}" />
				</form></li>
			<!-- /.dropdown -->
		</ul>
		<!-- /.navbar-top-links -->

		<div class="navbar-default sidebar  navbar-collapse collapse"
			role="navigation">
			<div class="sidebar-nav navbar-collapse">
				<ul class="nav" id="side-menu">
					<li><a th:href="@{/mgr/user/index}"
						th:class="${tag == 'userinfo'}? active:''"> 个人信息管理</a></li>
					<li th:class="${tag == 'space'}? active:''"><a
						th:href="@{/mgr/space/index}"> 空间管理</a></li>
					<li th:class="${tag == 'files'}? active:''"><a
						th:href="@{/mgr/file/index}"> 文件管理</a></li>
					<li th:class="${tag == 'files'}? active:''"><a
						th:href="@{/mgr/static/index}"> 静态资源管理</a></li>
					<li><a th:href="@{/mgr/article/index}"
						th:class="${tag == 'article'}? active:''"> 文章管理</a></li>
					<li th:class="${tag == 'news'}? active:''"><a
						th:href="@{/mgr/news/index}">动态管理</a></li>
					<li><a href="javascript:;" data-toggle="collapse"
						data-target="#tplMgr"> 模板管理</a>
						<ul id="tplMgr" class="nav nav-second-level collapse in">
							<li><a th:class="${tag == 'tpl-page'}? active:''"
								th:href="@{/mgr/template/page/index}">页面管理</a></li>
							<li><a th:class="${tag == 'tpl-fragment'}? active:''"
								th:href="@{/mgr/template/fragment/index}">模板片段管理</a></li>
							<li><a th:href="@{/mgr/template/data/index}">数据管理</a></li>
							<li><a th:class="${tag == 'tpl-export'}? active:''"
								th:href="@{/mgr/template/export}">模板导入导出</a></li>
							<li><a th:class="${tag == 'tpl-other'}? active:''"
								th:href="@{/mgr/template/other}">其他</a></li>
						</ul> <!-- /.nav-second-level --></li>
					<li><a th:href="@{/mgr/tag/index}"
						th:class="${tag == 'tag'}? active:''"> 标签管理</a></li>
					<li><a th:href="@{/mgr/statistics}"
						th:class="${tag == 'statistics'}? active:''"> 统计</a></li>
					<li><a href="javascript:;" data-toggle="collapse"
						data-target="#config"> 配置管理</a>
						<ul id="config" class="nav nav-second-level collapse in">
							<li><a th:class="${tag == 'config-global'}? active:''"
								th:href="@{/mgr/config/global/index}">分页数目配置</a></li>
						</ul></li>
					<div th:remove="tag" th:each="menu : ${menus}">
						<div th:with="children=${menu.children}" th:remove="tag">
							<li th:if="${#lists.isEmpty(children)}"><a
								th:href="${urls.url}+'/'+${menu.path}">[[${messages.getMessage(menu.name)}]]</a></li>

							<li th:unless="${#lists.isEmpty(children)}"><a
								href="javascript:;" data-toggle="collapse"
								th:data-target="'#plugin_'+${menu.id}">[[${messages.getMessage(menu.name)}]]</a>
								<ul th:id="'plugin_'+${menu.id}"
									class="nav nav-second-level collapse in">
									<li th:each="child : ${children}"><a
										th:href="${urls.url}+'/'+${child.path}">[[${messages.getMessage(child.name)}]]</a></li>
								</ul></li>
						</div>
					</div>
				</ul>
			</div>
		</div>
	</nav>
</div>